cmake_minimum_required(VERSION 3.23)
project(PSDemuxer)

set(CMAKE_CXX_STANDARD 14)

include_directories(${PROJECT_SOURCE_DIR}/)
file(GLOB _Source ${PROJECT_SOURCE_DIR}/*.cpp
                  ${PROJECT_SOURCE_DIR}/*.c)

add_executable(PSDemuxer ${_Source})
target_link_libraries(${PROJECT_NAME} ws2_32)

add_custom_command(
        TARGET ${PROJECT_NAME}  PRE_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy
        ${PROJECT_SOURCE_DIR}/video_error.playload
        ${CMAKE_CURRENT_BINARY_DIR}/video_error.playload)